package com.bigdata.appliance.common.exception;

public enum ResponseCode {
    SUCCESS(0, "响应成功"),
    SYSTEM_ERROR(500000, "服务异常，请稍后重试"),
    OPERATION_ERROR(500001, "操作失败，请稍后重试"),
    DATA_PARAM_ERROR(400000, "传入参数错误"),
    ACCOUNT_ALREADY_EXISTS(400001, "账号已存在，请前往登录"),
    ACCOUNT_NOT_FOUND(400002, "账号不存在"),
    ACCOUNT_ERROR(400004, "账号密码不匹配，请稍后重试"),
    TOKEN_ERROR(401000, "token已失效，请重新登录"),
    BALANCE_NOT_ENOUGH_EXISTS(400005, "余额不足支付失败"),
    ;
    private final int code;
    private final String message;

    ResponseCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
